<div class="barbie-voting-palace">
    <div class="barbie-crown">👑</div>
    
    <form action="{% url 'polls:vote' question.id %}" method="post" class="barbie-dream-form">
        {% csrf_token %}
        
        <div class="barbie-form-header">
            <div class="barbie-magic-wand">✨</div>
            <h1 class="barbie-princess-question">{{ question.question_text }}</h1>
            <div class="barbie-magic-wand">✨</div>
        </div>
        
        {% if error_message %}
        <div class="barbie-error-alert">
            <div class="barbie-error-sparkle">💫</div>
            <div class="barbie-error-icon">⚠️</div>
            <p class="barbie-error-text">{{ error_message }}</p>
            <div class="barbie-error-sparkle">💫</div>
        </div>
        {% endif %}
        
        <div class="barbie-choices-ballroom">
            {% for choice in question.choice_set.all %}
            <div class="barbie-choice-card">
                <input type="radio" 
                       name="choice" 
                       id="choice{{ forloop.counter }}" 
                       value="{{ choice.id }}" 
                       class="barbie-princess-radio">
                
                <label for="choice{{ forloop.counter }}" class="barbie-choice-gown">
                    <span class="barbie-choice-jewel">{{ forloop.counter }}</span>
                    <span class="barbie-choice-text">{{ choice.choice_text }}</span>
                    <span class="barbie-magic-sparkles">
                        <span>✨</span>
                        <span>🌟</span>
                        <span>💖</span>
                    </span>
                </label>
                <div class="barbie-choice-hearts"></div>
            </div>
            {% endfor %}
        </div>
        
        <button type="submit" class="barbie-magic-button">
            <span class="barbie-button-text">施展魔法选择</span>
            <span class="barbie-button-glow"></span>
            <span class="barbie-button-sparkles">
                <span>💖</span>
                <span>✨</span>
                <span>🌟</span>
            </span>
        </button>
    </form>
    
    <div class="barbie-princess-footer">
        <div class="barbie-shoes">👠</div>
        <p class="barbie-footer-message">每位公主的选择都将创造魔法！</p>
        <div class="barbie-footer-stars">
            <span>⭐</span>
            <span>🌟</span>
            <span>💫</span>
        </div>
    </div>
</div>

<style>
    /* 梦幻芭比公主主题 */
    :root {
        --barbie-pink: #ffd6e7;
        --barbie-dark-pink: #ff9bb8;
        --barbie-light-pink: #fff0f7;
        --barbie-accent: #ff69b4;
        --barbie-purple: #d14d8b;
        --barbie-gold: #ffd700;
        --barbie-silver: #e0e0e0;
    }
    
    .barbie-voting-palace {
        max-width: 650px;
        margin: 40px auto;
        position: relative;
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23ffb6c1" stroke-width="0.5" stroke-dasharray="5,5"/></svg>');
        padding-top: 40px;
    }
    
    .barbie-crown {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        font-size: 3em;
        z-index: 10;
        text-shadow: 0 0 10px var(--barbie-gold);
        animation: float 3s ease-in-out infinite;
    }
    
    .barbie-dream-form {
        background: linear-gradient(135deg, var(--barbie-light-pink), white);
        border: 3px solid var(--barbie-accent);
        border-radius: 30px;
        padding: 40px 30px;
        box-shadow: 0 15px 30px rgba(255, 105, 180, 0.25),
                    inset 0 0 20px rgba(255, 182, 193, 0.3);
        position: relative;
        overflow: hidden;
        z-index: 1;
    }
    
    .barbie-dream-form::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 10px;
        background: linear-gradient(to right, 
            var(--barbie-accent), 
            var(--barbie-gold), 
            var(--barbie-accent));
        z-index: 2;
    }
    
    .barbie-dream-form::after {
        content: "";
        position: absolute;
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border: 1px dashed rgba(255, 182, 193, 0.5);
        border-radius: 20px;
        pointer-events: none;
        z-index: -1;
    }
    
    .barbie-form-header {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 30px;
        gap: 20px;
        position: relative;
    }
    
    .barbie-princess-question {
        color: var(--barbie-purple);
        text-align: center;
        margin: 0;
        font-size: 2em;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        background: linear-gradient(to right, var(--barbie-purple), var(--barbie-accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        padding: 0 20px;
        position: relative;
    }
    
    .barbie-princess-question::before,
    .barbie-princess-question::after {
        content: "";
        position: absolute;
        top: 50%;
        width: 30px;
        height: 3px;
        background: linear-gradient(to right, var(--barbie-accent), transparent);
    }
    
    .barbie-princess-question::before {
        left: -20px;
    }
    
    .barbie-princess-question::after {
        right: -20px;
        background: linear-gradient(to left, var(--barbie-accent), transparent);
    }
    
    .barbie-magic-wand {
        font-size: 2em;
        color: var(--barbie-gold);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
        animation: sparkle 2s infinite alternate;
    }
    
    .barbie-error-alert {
        background-color: white;
        border: 2px solid var(--barbie-accent);
        border-radius: 20px;
        padding: 15px 20px;
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        color: var(--barbie-purple);
        box-shadow: 0 4px 10px rgba(255, 105, 180, 0.2);
        position: relative;
        overflow: hidden;
    }
    
    .barbie-error-alert::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 214, 231, 0.3), rgba(255, 255, 255, 0.5));
        z-index: -1;
    }
    
    .barbie-error-icon {
        font-size: 1.8em;
        animation: shake 0.5s ease-in-out;
    }
    
    .barbie-error-sparkle {
        font-size: 1.2em;
        opacity: 0.7;
        animation: twinkle 2s infinite alternate;
    }
    
    .barbie-error-text {
        margin: 0;
        font-weight: bold;
        text-align: center;
        flex-grow: 1;
    }
    
    .barbie-choices-ballroom {
        margin: 30px 0;
    }
    
    .barbie-choice-card {
        margin-bottom: 20px;
        position: relative;
        transition: all 0.4s;
    }
    
    .barbie-choice-card:hover {
        transform: translateY(-5px);
    }
    
    .barbie-princess-radio {
        position: absolute;
        opacity: 0;
    }
    
    .barbie-choice-gown {
        display: flex;
        align-items: center;
        padding: 18px 25px 18px 60px;
        background: linear-gradient(to right, white, var(--barbie-light-pink));
        border: 2px solid var(--barbie-dark-pink);
        border-radius: 50px;
        color: var(--barbie-purple);
        font-weight: bold;
        cursor: pointer;
        transition: all 0.4s;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(255, 105, 180, 0.1);
        z-index: 1;
    }
    
    .barbie-choice-gown::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        background: linear-gradient(to right, var(--barbie-pink), var(--barbie-light-pink));
        transition: width 0.4s;
        z-index: -1;
    }
    
    .barbie-choice-gown:hover::before {
        width: 100%;
    }
    
    .barbie-choice-gown:hover {
        border-color: var(--barbie-accent);
        box-shadow: 0 6px 15px rgba(255, 105, 180, 0.2);
    }
    
    .barbie-choice-jewel {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background: linear-gradient(135deg, var(--barbie-accent), var(--barbie-purple));
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1em;
        transition: all 0.3s;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .barbie-choice-text {
        flex-grow: 1;
        transition: all 0.3s;
    }
    
    .barbie-magic-sparkles {
        display: flex;
        margin-left: 15px;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .barbie-magic-sparkles span {
        display: inline-block;
        margin: 0 2px;
    }
    
    .barbie-princess-radio:checked + .barbie-choice-gown {
        background: linear-gradient(to right, var(--barbie-accent), var(--barbie-dark-pink));
        color: white;
        border-color: var(--barbie-purple);
    }
    
    .barbie-princess-radio:checked + .barbie-choice-gown .barbie-choice-jewel {
        background: linear-gradient(135deg, white, var(--barbie-silver));
        color: var(--barbie-accent);
        transform: translateY(-50%) scale(1.1);
    }
    
    .barbie-princess-radio:checked + .barbie-choice-gown .barbie-magic-sparkles {
        opacity: 1;
    }
    
    .barbie-choice-hearts {
        position: absolute;
        top: -10px;
        right: -10px;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .barbie-choice-card:hover .barbie-choice-hearts {
        opacity: 1;
    }
    
    .barbie-magic-button {
        display: block;
        width: 100%;
        padding: 18px;
        background: linear-gradient(135deg, var(--barbie-accent), var(--barbie-purple));
        color: white;
        border: none;
        border-radius: 50px;
        font-size: 1.2em;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.4s;
        box-shadow: 0 6px 15px rgba(255, 105, 180, 0.4);
        margin-top: 30px;
        position: relative;
        overflow: hidden;
        z-index: 1;
    }
    
    .barbie-button-text {
        position: relative;
        z-index: 2;
    }
    
    .barbie-button-glow {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), transparent 70%);
        opacity: 0;
        transition: opacity 0.4s;
        z-index: 1;
    }
    
    .barbie-button-sparkles {
        position: absolute;
        right: 25px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        gap: 5px;
        z-index: 2;
    }
    
    .barbie-button-sparkles span {
        display: inline-block;
        animation: sparkle 1.5s infinite;
    }
    
    .barbie-button-sparkles span:nth-child(1) { animation-delay: 0s; }
    .barbie-button-sparkles span:nth-child(2) { animation-delay: 0.5s; }
    .barbie-button-sparkles span:nth-child(3) { animation-delay: 1s; }
    
    .barbie-magic-button:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(255, 105, 180, 0.5);
    }
    
    .barbie-magic-button:hover .barbie-button-glow {
        opacity: 0.6;
    }
    
    .barbie-magic-button:active {
        transform: translateY(2px);
    }
    
    .barbie-princess-footer {
        text-align: center;
        margin-top: 25px;
        position: relative;
        padding: 20px 0;
    }
    
    .barbie-shoes {
        font-size: 2em;
        margin-bottom: 10px;
        display: inline-block;
        transform: rotate(-15deg);
        animation: swing 3s infinite ease-in-out;
    }
    
    .barbie-footer-message {
        font-style: italic;
        color: var(--barbie-purple);
        font-size: 1.1em;
        margin: 15px 0;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        position: relative;
    }
    
    .barbie-footer-message::before,
    .barbie-footer-message::after {
        content: "❀";
        color: var(--barbie-accent);
        margin: 0 10px;
    }
    
    .barbie-footer-stars {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }
    
    .barbie-footer-stars span {
        animation: float 3s infinite ease-in-out;
    }
    
    .barbie-footer-stars span:nth-child(1) { animation-delay: 0s; }
    .barbie-footer-stars span:nth-child(2) { animation-delay: 1s; }
    .barbie-footer-stars span:nth-child(3) { animation-delay: 2s; }
    
    /* 动画效果 */
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
    
    @keyframes sparkle {
        0% { opacity: 0.3; transform: scale(0.8); }
        50% { opacity: 1; transform: scale(1.2); }
        100% { opacity: 0.3; transform: scale(0.8); }
    }
    
    @keyframes twinkle {
        0% { opacity: 0.3; }
        100% { opacity: 1; }
    }
    
    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        20%, 60% { transform: translateX(-5px); }
        40%, 80% { transform: translateX(5px); }
    }
    
    @keyframes swing {
        0%, 100% { transform: rotate(-15deg); }
        50% { transform: rotate(15deg); }
    }
    
    /* 响应式设计 */
    @media (max-width: 650px) {
        .barbie-voting-palace {
            padding: 20px;
            margin: 20px;
        }
        
        .barbie-dream-form {
            padding: 25px 20px;
        }
        
        .barbie-princess-question {
            font-size: 1.6em;
        }
        
        .barbie-choice-gown {
            padding: 15px 20px 15px 50px;
        }
        
        .barbie-magic-button {
            padding: 15px;
            font-size: 1.1em;
        }
    }
</style>